<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:t="http://myfaces.apache.org/tomahawk"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:s="http://myfaces.apache.org/sandbox"
                xmlns:jwork="http://irian.at/jsfatwork"
        >
    <div>
        <h:commandLink id="addnew" action="#{bean['addNew']}" immediate="true">
            <h:outputText value="Add new #{entityName}" />
            <s:pprSubmit />
        </h:commandLink>
    </div>
    <br/>
    <s:pprPanelGroup id="addnewgroup" partialTriggers="addnew, save, cancel">

        <h:panelGrid rendered="#{bean['addNew']}" columns="3" >

            <h:inputHidden id="error" />
            <h:message for="error" styleClass="warning" />
            <h:panelGroup />

            <ui:insert name="inputFields" />

            <h:panelGroup />
            <h:panelGrid columns="2">
                <h:panelGroup>
                    <jwork:buttonSave id="#{idSave}" pprSubmit="true" />
                </h:panelGroup>
                <h:panelGroup>
                    <jwork:buttonCancel id="cancel" pprSubmit="true" />
                </h:panelGroup>
            </h:panelGrid>
            <h:panelGroup />

        </h:panelGrid>
    </s:pprPanelGroup>

</ui:composition>
